const vignette_frag =/*wgsl*/`
struct Input {  
    @location(0) uv : vec2<f32>,
};
struct Output {
    @location(0) color:vec4<f32>,
};
struct Vigenette{
    color:vec3<f32>,
    intensity:f32,
    center:vec2<f32>,
    smothness:f32,
}
fn vg(input:Input,color:vec3<f32>)->vec3<f32>{
    var suv:vec2<f32>=abs(input.uv-vigenette.center)*vigenette.intensity;
    suv=pow(saturate(suv),vec2<f32>(vigenette.smothness,vigenette.smothness));
    var dist:f32=length(suv);
    var factor:f32=pow(saturate(1.0-dist*dist),vigenette.smothness);
    var out:vec3<f32>=mix(vigenette.color,color,factor);
    return out;
}
@group(0) @binding(0) var Sampler: sampler;
@group(0) @binding(1) var Texture: texture_2d<f32>;
@group(0) @binding(2) var <uniform> vigenette : Vigenette;
@fragment
fn main(input:Input) -> Output {
    var output:Output;
    var color=textureSample(Texture, Sampler,input.uv);
    var vgcolor:vec3<f32>=vg(input,color.xyz);
    output.color=vec4(vgcolor,color.w);
    return output;
}
`
export {vignette_frag}